Uh oh! Wolfram|Alpha doesn't run without JavaScript.
Please enable JavaScript. If you don't know how, you can find instructions
here
.
Once you've done that, refresh this page to start using Wolfram|Alpha.
f(x)=Piecewise[{{1-x, 0 <= x < 2}, {1-(x-2), 2 <= x < 4}}]
Natural Language
Math Input
Extended Keyboard
Examples
Upload
Random